<template>
	<view class="protocol">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:''
			}
		},
		onLoad() {
			this.loadData()
		},
		
		methods:{
			loadData() {
				const $this = this
				uni.showLoading({
					title: 'loading...'
				})
				this._get('index/policy', {}, function(res) {
			
					uni.hideLoading()
					const {
						code,
						data
					} = res
					if (code === 1) {
						$this.content = data.service
						$this.content = $this.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
					}
				});
			}
		}
	}
</script>

<style lang="less">
	.protocol{
		padding: 37rpx 33rpx 40rpx;
		font-size:33rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(51,51,51,1);
		line-height:43rpx;
	}
</style>
